package com.ruoyi.system.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.VisitGuideCateMapper;
import com.ruoyi.system.domain.VisitGuideCate;
import com.ruoyi.system.service.IVisitGuideCateService;

/**
 * 就诊指南分类Service业务层处理
 * 
 * @author ruoyi
 * @date 2025-06-26
 */
@Service
public class VisitGuideCateServiceImpl implements IVisitGuideCateService 
{
    @Autowired
    private VisitGuideCateMapper visitGuideCateMapper;

    /**
     * 查询就诊指南分类
     * 
     * @param id 就诊指南分类主键
     * @return 就诊指南分类
     */
    @Override
    public VisitGuideCate selectVisitGuideCateById(Integer id)
    {
        return visitGuideCateMapper.selectVisitGuideCateById(id);
    }

    /**
     * 查询就诊指南分类列表
     * 
     * @param visitGuideCate 就诊指南分类
     * @return 就诊指南分类
     */
    @Override
    public List<VisitGuideCate> selectVisitGuideCateList(VisitGuideCate visitGuideCate)
    {
        return visitGuideCateMapper.selectVisitGuideCateList(visitGuideCate);
    }

    /**
     * 新增就诊指南分类
     * 
     * @param visitGuideCate 就诊指南分类
     * @return 结果
     */
    @Override
    public int insertVisitGuideCate(VisitGuideCate visitGuideCate)
    {
        visitGuideCate.setCreateTime(DateUtils.getNowDate());
        return visitGuideCateMapper.insertVisitGuideCate(visitGuideCate);
    }

    /**
     * 修改就诊指南分类
     * 
     * @param visitGuideCate 就诊指南分类
     * @return 结果
     */
    @Override
    public int updateVisitGuideCate(VisitGuideCate visitGuideCate)
    {
        visitGuideCate.setUpdateTime(DateUtils.getNowDate());
        return visitGuideCateMapper.updateVisitGuideCate(visitGuideCate);
    }

    /**
     * 批量删除就诊指南分类
     * 
     * @param ids 需要删除的就诊指南分类主键
     * @return 结果
     */
    @Override
    public int deleteVisitGuideCateByIds(Integer[] ids)
    {
        return visitGuideCateMapper.deleteVisitGuideCateByIds(ids);
    }

    /**
     * 删除就诊指南分类信息
     * 
     * @param id 就诊指南分类主键
     * @return 结果
     */
    @Override
    public int deleteVisitGuideCateById(Integer id)
    {
        return visitGuideCateMapper.deleteVisitGuideCateById(id);
    }
}
